package com.p2p.entity;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.sql.Timestamp;

@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "借贷信息")
public class Loan {
  @ApiModelProperty(name = "id", notes = "id", dataType = "Long", required = false)
  @TableId(type = IdType.ASSIGN_ID)
  private Long id;
  @ApiModelProperty(name = "loanNum", notes = "借贷编号", dataType = "String", required = false)
  private String loanNum;
  @ApiModelProperty(name = "title", notes = "借贷标题", dataType = "String", required = false)
  private String title;
  @ApiModelProperty(name = "riskLevel", notes = "风险等级（0较低，1低，2中等，3中高，4高）", dataType = "Byte", required = false)
  private Byte riskLevel;
  @ApiModelProperty(name = "borrowId", notes = "借款人id", dataType = "Long", required = false)
  private Long borrowId;
  @ApiModelProperty(name = "loanAmount", notes = "借贷总金额", dataType = "BigDecimal", required = false)
  private BigDecimal loanAmount;
  @ApiModelProperty(name = "annualInterestRate", notes = "借款年利率", dataType = "BigDecimal", required = false)
  private BigDecimal annualInterestRate;
  @ApiModelProperty(name = "repaymentMethod", notes = "还款方式（0一次性还款，1等额本息，2按月付息到期还本，3按天还款）", dataType = "Byte", required = false)
  private Byte repaymentMethod;
  @ApiModelProperty(name = "termType", notes = "借款期限类型（0月，1天）", dataType = "Byte", required = false)
  private Byte termType;
  @ApiModelProperty(name = "loanTerm", notes = "借款期限", dataType = "String", required = false)
  private String loanTerm;
  @ApiModelProperty(name = "interestRateType", notes = "借款起息类型（0.不是成立计息 1.是成立计息）", dataType = "Byte", required = false)
  private Byte interestRateType;
  @ApiModelProperty(name = "managementFeeRate", notes = "借款管理费月率", dataType = "BigDecimal", required = false)
  private BigDecimal managementFeeRate;
  @ApiModelProperty(name = "penaltyRate", notes = "逾期罚息利率", dataType = "BigDecimal", required = false)
  private BigDecimal penaltyRate;
  @ApiModelProperty(name = "loanType", notes = "借款类型（0.新增  1.续贷  2.资产处理）", dataType = "Byte", required = false)
  private Byte loanType;
  @ApiModelProperty(name = "fundsUse", notes = "资金用途(0.短期周转  1.生意周转  2.购物消费  3.长期周转  4.其他用途)）", dataType = "Byte", required = false)
  private Byte fundsUse;
  @ApiModelProperty(name = "repaymentSource", notes = "还款资金来源", dataType = "String", required = false)
  private String repaymentSource;
  @ApiModelProperty(name = "isGuarantee", notes = "是否担保（0.否  1.是 默认不担保）", dataType = "Byte", required = false)
  private Byte isGuarantee;
  @ApiModelProperty(name = "guaranteeIns", notes = "担保机构(0.上海泽润典当有限公司  默认)", dataType = "Byte", required = false)
  private Byte guaranteeIns;
  @ApiModelProperty(name = "mortgageType", notes = "抵押类型（抵押类型（0.无  1.房抵  2.车抵  3.民品抵））", dataType = "Byte", required = false)
  private Byte mortgageType;
  @ApiModelProperty(name ="mortgageInfo", notes = "抵押物材料（抵押物相片）", dataType = "String", required = false)
  private String collateralMaterial;
  @ApiModelProperty(name = "loanInformation", notes = "借款资料", dataType = "String", required = false)
  private String loanInformation;
  @ApiModelProperty(name = "createTime", notes = "创建时间", dataType = "Timestamp", required = false)
  @JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
  private Timestamp createTime;
  @ApiModelProperty(name = "updateTime", notes = "更新时间", dataType = "Timestamp", required = false)
  @JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
  private Timestamp updateTime;
  @ApiModelProperty(name = "isDeleted", notes = "是否删除（0.否  1.是）", dataType = "Byte", required = false)
  @TableLogic
  private Byte isDeleted;
}
